package cc.mrbird;

import cc.mrbird.demo.anno.EnableHelloWorld;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author: chenhs
 * @date: Created in 7:10 2020/3/18
 **/
@EnableHelloWorld
public class TestEnableBootstrap {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = new SpringApplicationBuilder(TestEnableBootstrap.class)
                .web(WebApplicationType.NONE)
                .run(args);
        String hello = context.getBean("hello", String.class);
        System.out.println(hello);
        context.close();
    }
}
